<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ page import="crm.model.Saleskills" %>
<%@ page import="crm.control.SaleskillsControl"%>
<%@ page import="java.util.*"  %>
<html>
<body>
<% 
request.setCharacterEncoding("UTF-8"); 
Saleskills saleskills = new Saleskills(); 

String theme = request.getParameter("theme"); 
saleskills.setTheme(theme); 
 
String content = request.getParameter("content"); 
saleskills.setContent(content); 
 
int writer = Integer.parseInt(request.getParameter("writer")); 
saleskills.setWriter(writer); 
 
 
SaleskillsControl sc = new SaleskillsControl(); 
 
if(sc.insertSaleskills(saleskills)) 
{ 
	%>	
<script language = "javascript">
if(window.confirm("录入成功，是否继续销售技巧？"))
window.location.href = "saleskill_add.jsp";
else
window.location.href = "saleskill.jsp";
</script>
<%} else { %>
<script language="javascript">
if(window.confirm("录入失败，是否继续录入？"))
window.location.href = "saleskill_add.jsp";
else
window.location.href = "saleskill.jsp";
</script>
<%
	}
%>
</body>
</html>
